Namespaces

Classes

Functions

array|string|null
__(string|null $key = null, array $replace = [], string|null $locale = null)

Translate the given message.

at line 955
never
abort(mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data.

at line 63
void
abort_if(bool $boolean, mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data if the given condition is true.

at line 85
void
abort_unless(bool $boolean, mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data unless the given condition is true.

at line 104
string
action(array|string $name, array|string $parameters = [], bool $absolute = true)

Generate the URL to a controller action.

at line 118
Application : mixed))
app(string|null $abstract = null, array $parameters = [])

Get the available container instance.

at line 134
string
app_id()

Get the configured application identifier for config defaults.

at line 152
string
app_path(string $path = '')

Get the path to the application folder.

at line 176
array
append_config(array $array)

Assign high numeric IDs to a config item to force appending.

at line 23
string
asset(string $path, bool|null $secure = null)

Generate an asset path for the application.

at line 186
auth(string|null $guard = null)

Get the auth manager or a specific guard instance.

at line 198
back(int $status = 302, array $headers = [], mixed $fallback = false)

Create a new redirect response to the previous location.

at line 212
string
base_path(string $path = '')

Get the path to the base of the install.

at line 222
string
bcrypt(string $value, array $options = [])

Hash the given value against the bcrypt algorithm.

at line 238
bool
blank(mixed $value)

Determine if the given value is "blank".

at line 49
broadcast(mixed $event = null)

Begin broadcasting an event.

at line 249
broadcast_if(bool $boolean, mixed $event = null)

Begin broadcasting an event if the given condition is true.

at line 259
broadcast_unless(bool $boolean, mixed $event = null)

Begin broadcasting an event unless the given condition is true.

at line 273
CacheManager : ($key is string ? mixed : bool))
cache(null|array<string, mixed>|string $key = null, mixed $default = null)

Get / set the specified cache value.

at line 291
string
class_basename(object|string $class)

Get the class "basename" of the given object / class.

at line 85
array
class_uses_recursive(object|string $class)

Returns all traits used by a class, its parent classes and trait of their traits.

at line 100
collect(null|TValue>|TValue> $value = [])

Create a collection from the given value.

at line 18
mixed
config(mixed $key = null, mixed $default = null)

Get / set the specified configuration value.

at line 322
string
config_path(string $path = '')

Get the configuration path.

at line 342
bool
conflictsWithFacade(ReflectionClass $facade, ReflectionMethod|string $method)

Determine if the given method conflicts with a Facade method.

at line 1049
Repository)
context(null|array|string $key = null, mixed $default = null)

Get / set the specified context value.

at line 362
csrf_field()

Generate a CSRF token form field.

at line 397
string|null
csrf_token()

Get the CSRF token value.

at line 409
mixed
data_fill(mixed $target, array|string $key, mixed $value)

Fill in data where it's missing.

at line 33
mixed
data_forget(mixed $target, null|array|int|string $key)

Remove / unset an item from an array or object using "dot" notation.

at line 200
mixed
data_get(mixed $target, null|array|int|string $key, mixed $default = null)

Get an item from an array or object using "dot" notation.

at line 77
bool
data_has(mixed $target, null|array|int|string $key)

Determine if a key / property exists on an array or object using "dot" notation.

at line 46
mixed
data_set(mixed $target, array|string $key, mixed $value, bool $overwrite = true)

Set an item on an array or object using dot notation.

at line 140
string
database_path(string $path = '')

Get the path to the database folder.

at line 425
debug(string $message)

Log the given message when running with --verbose.

at line 181
mixed
decrypt(string $value, bool $unserialize = true)

Decrypt the given value.

at line 441
defer(callable|null $callback = null, string|null $name = null, bool $always = false)

Defer execution of the given callback.

at line 1035
class-string
determineFqcn(string $class, ReflectionClass $source)

Determine the fully qualified class name.

at line 209
dispatch(mixed $job)

Dispatch a job to its appropriate handler.

at line 455
mixed
dispatch_sync(mixed $job, mixed $handler = null)

Dispatch a command to its appropriate handler in the current process.

at line 469
string
e(BackedEnum|DeferringDisplayableValue|Stringable|float|Htmlable|int|string|null $value, bool $doubleEncode = true)

Encode HTML special characters in a string.

at line 120
string
encrypt(mixed $value, bool $serialize = true)

Encrypt the given value.

at line 481
mixed
env(string $key, mixed $default = null)

Gets the value of an environment variable.

at line 142
array
env_array(string $key, array $default = [])

Get a comma-separated environment variable as an array.

at line 155
mixed
env_or_fail(string $key)

Get a required environment variable.

at line 167
mixed
event(mixed ...$args)

Dispatch an event and call the listeners.

at line 492
exceptionHandler(Throwable $exception)

Handle the uncaught exceptions.

at line 170
Generator
fake(string|null $locale = null)

Get a faker instance.

at line 502
bool
filled(mixed $value)

Determine if a value is "filled".

at line 183
fluent(null|iterable|object $value = null)

Create a Fluent object from the given value.

at line 195
bool
fulfillsBuiltinInterface(ReflectionMethodDecorator|string $method)

Determine if the method is for a builtin contract.

at line 1003
string|null
getModelForGuard(string $guard)

Get the model class for a guard.

at line 15
int|string|null
getPermissionsTeamId()

Get the current permissions team id.

at line 35
string
handleUnknownIdentifierType(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, IdentifierTypeNode $typeNode)

Handle unknown identifier types.

at line 557
mixed
head(array $array)

Get the first element of an array. Useful for method chaining.

at line 235
inertia(string|null $component = null, array|Arrayable $props = [])

Inertia helper.

at line 18
Response
inertia_location(string $url)

Inertia location helper.

at line 34
string
inferValueType(mixed $value)

Infer a PHPDoc-friendly type string from a concrete PHP value.

at line 702
info(Arrayable|Jsonable|Stringable|array|string $message, array $context = [], bool $callerLocation = false)

No description

at line 524
bool
isBuiltIn(string $type)

Determine if the type is a built-in.

at line 807
bool
isDeprecated(ReflectionMethod|string $method)

Determine if the method is deprecated.

at line 988
bool
isInternal(ReflectionMethod|string $method)

Determine if the method is marked as @internal.

at line 973
bool
isKnownOptionalDependency(string $type)

Determine if the type is known optional dependency.

at line 822
bool
isMagic(ReflectionMethod|string $method)

Determine if the method is magic.

at line 962
string
lang_path(string $path = '')

Get the path to the language folder.

at line 539
mixed
last(array $array)

Get the last element from an array.

at line 248
object
lazy(string|Closure $class, Closure|int $callback = 0, int $options = 0, array $eager = [])

Create a lazy instance.

at line 21
mixed
literal(...$arguments)

Return a new literal or anonymous object using named arguments.

at line 207
LoggerInterface|null
logger(Arrayable|Jsonable|Stringable|array|string|null $message = null, array $context = [])

Log a debug message to the logs.

at line 557
LoggerInterface|LogManager
logs(string|null $driver = null)

Get a log driver instance.

at line 576
null|string
mergeDocblockTypeWithNativeNullability(null|string $docblockType, null|string $nativeType)

Merge the docblock-resolved type string with the native reflection type, preserving the docblock's precision while honouring native nullability.

at line 772
method_field(string $method)

Generate a form field to spoof the HTTP verb used by forms.

at line 586
array|string
normaliseDetails(ReflectionMethodDecorator|string $method)

Normalise the method details into a easier format to work with.

at line 1062
CarbonInterface
now(UnitEnum|DateTimeZone|string|null $tz = null)

Create a new configured Carbon instance for the current time.

at line 596
TValue : mixed)
object_get(TValue $object, null|string $key, mixed $default = null)

Get an item from an object using "dot" notation.

at line 228
string|array|null
old(string|null $key = null, mixed $default = null)

Retrieve an old input item.

at line 606
TReturnType
once(callable $callback)

Ensures a callable is only called once, and returns the result on subsequent calls.

at line 255
TReturn))
optional(TValue $value = null, callable|null $callback = null)

Provide access to optional objects.

at line 277
string
p(string $data)

No description

at line 23
PhpDocNode
parseDocblock(string $docblock)

Parse the given docblock.

at line 322
mixed|void
policy(object|string $class)

Get a policy instance for a given class.

at line 619
mixed
precognitive(callable|null $callable = null)

Handle a Precognition controller hook.

at line 629
string
preg_replace_array(string $pattern, array $replacements, string $subject)

Replace a given pattern with each value in the array in sequentially.

at line 298
object
proxy(string|Closure $class, Closure|int $callback = 0, int $options = 0, array $eager = [])

Create a lazy proxy instance.

at line 69
string
public_path(string $path = '')

Get the path to the public folder.

at line 654
redirect(string|null $to = null, int $status = 302, array $headers = [], bool|null $secure = null)

Get an instance of the redirector or create a redirect response.

at line 670
void
report(string|Throwable $exception)

Report an exception.

at line 684
void
report_if(bool $boolean, string|Throwable $exception)

Report an exception if the given condition is true.

at line 698
void
report_unless(bool $boolean, string|Throwable $exception)

Report an exception unless the given condition is true.

at line 710
mixed
request(array|string|null $key = null, mixed $default = null)

Get an instance of the current request or an input item from the request.

at line 726
TFallback|TValue
rescue(callable $callback, TFallback|TFallback $rescue = null, bool|Throwable): bool $report = true)

Catch a potential exception and return a default value.

at line 754
TClass : mixed)
resolve(string $name, array $parameters = [])

Resolve a service from the container.

at line 778
null|string
resolveClassConstantClass(string $className, ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the target class for a ConstFetchNode's className reference.

at line 669
Collection<string, class-string>
resolveClassImports(ReflectionClass $class)

Resolve the classes imports.

at line 1123
string
resolveConstFetchType(ConstFetchNode $node, ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the inferred PHP type of a class-constant fetch such as Foo::BAR or a wildcard like Foo::PREFIX_*.

at line 585
string
resolveDefaultValue(array $parameter)

Resolve the default value for the parameter.

at line 1161
Collection<string>
resolveDocMethods(ReflectionClass $class)

Resolve the classes referenced methods in the @methods docblocks.

at line 244
ReflectionClass>
resolveDocMixins(ReflectionClass $class, Collection<class-string> $encoutered = new Collection())

Recursively resolve docblock mixins.

at line 927
null|string
resolveDocParamType(ReflectionMethodDecorator $method, ReflectionParameter $parameter)

Resolve the parameters type from the @param docblocks.

at line 275
Collection<int, string>
resolveDocParameters(ReflectionMethodDecorator $method)

Resolve the classes referenced methods in the @methods docblocks.

at line 950
Collection<class-string>
resolveDocSees(ReflectionClass $class)

Resolve the classes referenced in the docblocks.

at line 232
Collection<string>
resolveDocTags(string $docblock, string $tag)

Resolve the docblock tags.

at line 881
null|string
resolveDocblockTypes(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, TypeNode $typeNode, mixed $depth = 1)

Resolve the types from the docblock.

at line 339
Collection<int, string>
resolveIgnoredMethods(ReflectionClass $facade)

Resolve method names that should be excluded from a facade docblock.

at line 901
resolveImportSource(ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the class whose file should be scanned for use imports when resolving types inside a method's docblock. When a method was inherited from a trait, the trait's own file (not the declaring class's file) holds the relevant use statements.

at line 1110
string
resolveKeyOrValueOf(ConstFetchNode $node, ReflectionClassDocblockContext|ReflectionMethodDecorator $method, bool $keyType)

Resolve key-of<...> / value-of<...> when the inner type is a ConstFetchNode.

at line 626
ReflectionMethodDecorator|string>
resolveMethods(ReflectionClass $class)

Resolve the classes methods.

at line 1035
string
resolveName(ReflectionMethod|string $method)

Resolve the methods name.

at line 1022
DynamicParameter|ReflectionParameter>
resolveParameters(ReflectionMethodDecorator $method)

Resolve the parameters for the method.

at line 1092
Collection<class-string>
resolveProxies(ReflectionClass $class)

Resolve the proxies for the Facade.

at line 196
null|string
resolveReturnDocType(ReflectionMethodDecorator $method)

Resolve the return type from the @return docblock.

at line 303
null|string
resolveType(ReflectionMethodDecorator $method, null|ReflectionType $type)

Resolve the declared type.

at line 837
string
resource_path(string $path = '')

Get the path to the resources folder.

at line 788
response(mixed $content = null, int $status = 200, array $headers = [])

Return a new response from the application.

at line 806
TValue
retry(array<int, int>|int $times, callable $callback, Throwable): int|int $sleepMilliseconds = 0, null|Throwable): bool $when = null)

Retry an operation a given number of times.

at line 322
string
route(BackedEnum|string $name, array $parameters = [], bool $absolute = true)

Generate the URL to a named route.

at line 824
string
secure_asset(string $path)

Generate an asset path for the application.

at line 834
string
secure_url(string $path, array $extra = [])

Generate a HTTPS URL for the application.

at line 844
mixed
session(array|string|null $key = null, mixed $default = null)

Get / set the specified session value.

at line 858
void
setPermissionsTeamId(int|string|Model|null $id)

Set the current permissions team id.

at line 25
string
shortenImportedGlobalTypes(string $method, Collection<string, class-string> $imports)

Shorten global method types already imported by the facade.

at line 1145
array<int, string>
splitTopLevelUnionTypes(string $type)

Split a type string on top-level "|" separators, preserving nested "|" that appear inside angle brackets (generics) or parentheses. Used to safely merge and dedupe union members produced from conditional type branches without shredding constructs like "array<int, int|string>" or "Collection<Foo|Bar>".

at line 725
string
storage_path(string $path = '')

Get the path to the storage folder.

at line 878
Stringable)
str(null|string $string = null)

Get a new stringable object from the given string.

at line 362
TValue)
tap(TValue $value, null|TValue): mixed $callback = null)

Call the given Closure with the given value then return the value.

at line 392
TValue
throw_if(TValue $condition, TExceptionValue|TExceptionValue $exception = 'RuntimeException', TParams ...$parameters)

Throw the given exception if the given condition is true.

at line 422
TValue
throw_unless(TValue $condition, TExceptionValue|TExceptionValue $exception = 'RuntimeException', TParams ...$parameters)

Throw the given exception unless the given condition is true.

at line 458
to_action(array|string $action, mixed $parameters = [], int $status = 302, array $headers = [])

Create a new redirect response to a controller action.

at line 894
to_route(string $route, array $parameters = [], int $status = 302, array $headers = [])

Create a new redirect response to a named route.

at line 904
CarbonInterface
today(UnitEnum|DateTimeZone|string|null $tz = null)

Create a new configured Carbon instance for the current date.

at line 914
array
trait_uses_recursive(object|string $trait)

Returns all traits used by a trait and its traits.

at line 473
array|string|Translator
trans(string|null $key = null, array $replace = [], string|null $locale = null)

Translate the given message.

at line 926
string
trans_choice(string $key, Countable|array|float|int $number, array $replace = [], string|null $locale = null)

Translates the given message based on a count.

at line 943
TReturn)
transform(TValue $value, callable $callback, TDefault|TDefault $default = null)

Transform the given value if it is present.

at line 498
Uri
uri(UriInterface|Stringable|array|string $uri, mixed $parameters = [], bool $absolute = true)

Generate a URI for the application.

at line 969
string|UrlGenerator
url(string|null $path = null, array $extra = [], bool|null $secure = null)

Generate a URL for the application.

at line 985
validator(array|null $data = null, array $rules = [], array $messages = [], array $attributes = [])

Create a new Validator instance.

at line 1001
TValue
value(TValue|TValue $value, TArgs ...$args)

Return the default value of the given value.

at line 265
view(string|null $view = null, array|Arrayable $data = [], array $mergeData = [])

Get the evaluated view contents for the given view.

at line 1017
($condition is non-empty-array|non-falsy-string|positive-int|TDefault|TDefault))
when(mixed $condition, TValue|TValue $value, TDefault|TDefault $default = null)

Return a value if the given condition is true.

at line 284
bool
windows_os()

Determine whether the current environment is Windows based.

at line 516
TReturn)
with(TValue $value, callable|null $callback = null)

Return the given value, optionally passed through the given callback.

at line 533

Exceptions